<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/* Start of file departements.php */
/* Location: ./cashflow/models/departements.php */
class Departments extends CI_Model {
    
	function __construct(){
        parent::__construct(); /** Call the Model constructor */
    }
	
	function getDataDepartment(){
		$this->db->order_by('KodeDir','ASC');
        $this->db->order_by('Nomor','ASC');
		$Q=$this->db->get('department');
		if ($Q->num_rows() > 0):
			foreach ($Q->result_array() as $row):
				$data[$row['DeptID']] = $row['Department'];
			endforeach;
		endif;
        $Q->free_result();
		return $data;   
	}
}
    